package org.apache.jsp.bbs;

import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import bbs.*;
import java.util.*;

public final class BbsList_jsp extends org.apache.jasper.runtime.HttpJspBase
    implements org.apache.jasper.runtime.JspSourceDependent {

  private static final JspFactory _jspxFactory = JspFactory.getDefaultFactory();

  private static java.util.List _jspx_dependants;

  private javax.el.ExpressionFactory _el_expressionfactory;
  private org.apache.AnnotationProcessor _jsp_annotationprocessor;

  public Object getDependants() {
    return _jspx_dependants;
  }

  public void _jspInit() {
    _el_expressionfactory = _jspxFactory.getJspApplicationContext(getServletConfig().getServletContext()).getExpressionFactory();
    _jsp_annotationprocessor = (org.apache.AnnotationProcessor) getServletConfig().getServletContext().getAttribute(org.apache.AnnotationProcessor.class.getName());
  }

  public void _jspDestroy() {
  }

  public void _jspService(HttpServletRequest request, HttpServletResponse response)
        throws java.io.IOException, ServletException {

    PageContext pageContext = null;
    HttpSession session = null;
    ServletContext application = null;
    ServletConfig config = null;
    JspWriter out = null;
    Object page = this;
    JspWriter _jspx_out = null;
    PageContext _jspx_page_context = null;


    try {
      response.setContentType("text/html;charset=euc-kr");
      pageContext = _jspxFactory.getPageContext(this, request, response,
      			null, true, 8192, true);
      _jspx_page_context = pageContext;
      application = pageContext.getServletContext();
      config = pageContext.getServletConfig();
      session = pageContext.getSession();
      out = pageContext.getOut();
      _jspx_out = out;

      out.write("\r\n");
      out.write("\r\n");
      out.write("\r\n");
      out.write("\r\n");
      out.write("\r\n");
      java.util.Hashtable outputTable = null;
      synchronized (request) {
        outputTable = (java.util.Hashtable) _jspx_page_context.getAttribute("outputTable", PageContext.REQUEST_SCOPE);
        if (outputTable == null){
          outputTable = new java.util.Hashtable();
          _jspx_page_context.setAttribute("outputTable", outputTable, PageContext.REQUEST_SCOPE);
        }
      }
      out.write('\r');
      out.write('\n');
      java.util.Hashtable inputTable = null;
      synchronized (request) {
        inputTable = (java.util.Hashtable) _jspx_page_context.getAttribute("inputTable", PageContext.REQUEST_SCOPE);
        if (inputTable == null){
          inputTable = new java.util.Hashtable();
          _jspx_page_context.setAttribute("inputTable", inputTable, PageContext.REQUEST_SCOPE);
        }
      }
      out.write("\r\n");
      out.write("\r\n");

	boolean loginYn = false;
	boolean adminYn = false;
	if(session != null && session.getAttribute("loginYn")!=null && ((String)session.getAttribute("loginYn")).equals("Y"))
	{
		loginYn = true;
	}
	if(loginYn && ((String)session.getAttribute("adminYn")).equals("Y"))
	{
		adminYn = true;
	}

	String code = (String)inputTable.get("code");

	BbsInfomation bi = new BbsInfomation(code);
	String bbsName = bi.getName();

	Integer pageNum = (Integer)inputTable.get("pageNum");

	String section = "TC";
	if(inputTable.containsKey("section"))
	{
		section = (String)inputTable.get("section");
	}

	String word = "";
	if(inputTable.containsKey("word"))
	{
		word = (String)inputTable.get("word");
	}

	ArrayList bbsList = (ArrayList)outputTable.get("bbsList");

	Integer pageTotalNum = (Integer)inputTable.get("pageTotalNum");
	Integer articleTotalNum = (Integer)inputTable.get("articleTotalNum");
	String startNum = "";
	String endNum = "";
	if(bbsList.size()>0)
	{
		startNum = (String)((Hashtable)bbsList.get(0)).get("DISP_NUM");
		endNum = (String)((Hashtable)bbsList.get(bbsList.size()-1)).get("DISP_NUM");
	}

      out.write("\r\n");
      out.write("\r\n");
      out.write("<SCRIPT language=\"JavaScript\">\r\n");
      out.write("\t// 글 보기\r\n");
      out.write("\tfunction viewAction(seq, hit)\r\n");
      out.write("\t{\r\n");
      out.write("\t\tvar f = document.bbsForm;\r\n");
      out.write("\t\tf.func.value = \"bbs_004\";\r\n");
      out.write("\t\tf.seq.value = seq;\r\n");
      out.write("\t\tf.hit.value = hit;\r\n");
      out.write("\t\tf.submit();\r\n");
      out.write("\t}\r\n");
      out.write("\r\n");
      out.write("\t// 글목록 정렬\r\n");
      out.write("\tfunction sortListAction(sort)\r\n");
      out.write("\t{\r\n");
      out.write("\t\tvar f = document.bbsForm;\r\n");
      out.write("\t\tf.func.value = \"bbs_001\";\r\n");
      out.write("\t\tf.sort.value = sort;\r\n");
      out.write("\t\tf.pageNum.value = '1';\r\n");
      out.write("\t\tf.submit();\r\n");
      out.write("\t}\r\n");
      out.write("\r\n");
      out.write("\t// 글쓰기\r\n");
      out.write("\tfunction goWrite()\r\n");
      out.write("\t{\r\n");
      out.write("\t\tvar f = document.bbsForm;\r\n");
      out.write("\t\tf.func.value = \"bbs_002\";\r\n");
      out.write("\t\tf.submit();\r\n");
      out.write("\t}\r\n");
      out.write("\r\n");
      out.write("\t// 검색\r\n");
      out.write("\tfunction searchAction()\r\n");
      out.write("\t{\r\n");
      out.write("\t\tvar f1 = document.searchForm;\r\n");
      out.write("\t\tvar f2 = document.bbsForm;\r\n");
      out.write("\t\tif(trim(f1.word.value) == \"\")\r\n");
      out.write("\t\t{\r\n");
      out.write("\t\t\twindow.alert(\"검색어를 입력하세요.\");\r\n");
      out.write("\t\t\tf1.word.select();\r\n");
      out.write("\t\t\treturn false;\r\n");
      out.write("\t\t}\r\n");
      out.write("\r\n");
      out.write("\t\tf2.func.value = \"bbs_001\";\r\n");
      out.write("\t\tf2.wordCountYn.value = \"Y\";\r\n");
      out.write("\t\tf2.pageNum.value = \"1\";\r\n");
      out.write("\t\tf2.section.value = f1.section.value;\r\n");
      out.write("\t\tf2.word.value = trim(f1.word.value);\r\n");
      out.write("\t\tf2.submit();\r\n");
      out.write("\t}\r\n");
      out.write("\r\n");
      out.write("\t// 전체보기\r\n");
      out.write("\tfunction allSearchAction()\r\n");
      out.write("\t{\r\n");
      out.write("\t\tvar f = document.bbsForm;\r\n");
      out.write("\r\n");
      out.write("\t\tf.func.value = \"bbs_001\";\r\n");
      out.write("\t\tf.section.value = \"TC\";\r\n");
      out.write("\t\tf.word.value = \"\";\r\n");
      out.write("\t\tf.pageNum.value = \"1\";\r\n");
      out.write("\t\tf.submit();\r\n");
      out.write("\t}\r\n");
      out.write("\r\n");
      out.write("\t// 파일 다운로드\r\n");
      out.write("\tfunction fileDownloadAction(svPath, svName, ogName)\r\n");
      out.write("\t{\r\n");
      out.write("\t\tvar f = document.fileDownloadForm;\r\n");
      out.write("\t\tf.savePath.value = svPath;\r\n");
      out.write("\t\tf.saveName.value = svName;\r\n");
      out.write("\t\tf.orgName.value = ogName;\r\n");
      out.write("\t\tf.submit();\r\n");
      out.write("\t}\r\n");
      out.write("\r\n");
      out.write("\r\n");
      out.write("\r\n");
      out.write("\r\n");
      out.write("\t// 검색어 자동완성기능\r\n");
      out.write("\tvar wordAjax;\r\n");
      out.write("\tvar completeDiv;\r\n");
      out.write("\tvar wordField;\r\n");
      out.write("\tvar nameTable;\r\n");
      out.write("\tvar nameTableBody;\r\n");
      out.write(" \r\n");
      out.write("\tfunction wordComplete()\r\n");
      out.write("\t{\r\n");
      out.write("\t\twordField = document.searchForm.word;   //검색어\r\n");
      out.write("\t\tnameTable = document.getElementById(\"wordTable\"); //검색어테이블\r\n");
      out.write("\t\tcompleteDiv = document.getElementById(\"wordDiv\");\r\n");
      out.write("\t\tnameTableBody = document.getElementById(\"wordTableBody\");\r\n");
      out.write(" \r\n");
      out.write("\t\tvar inputWord = trim(wordField.value);  //내가쓴글\r\n");
      out.write("\t\tif (inputWord.length > 0)\r\n");
      out.write("\t\t{\r\n");
      out.write("\t\t\twordAjax = createAjax();\r\n");
      out.write("\t\t\tvar url = \"/servlet/service.SearchWordAutoCompleteServlet?sw=\" + inputWord;\r\n");
      out.write("\t\t\twordAjax.open(\"GET\", url, true);\r\n");
      out.write("\t\t\twordAjax.onreadystatechange = wordListReceiveResponse;\r\n");
      out.write("\t\t\twordAjax.send(\"\");\r\n");
      out.write("\t\t}\r\n");
      out.write("\t\telse\r\n");
      out.write("\t\t{\r\n");
      out.write("\t\t\tclearList();\r\n");
      out.write("\t\t}\r\n");
      out.write("\t}\r\n");
      out.write(" \r\n");
      out.write("\tfunction wordListReceiveResponse()\r\n");
      out.write("\t{\r\n");
      out.write("\t\tif (wordAjax.readyState == 4)\r\n");
      out.write("\t\t{\r\n");
      out.write("\t\t\tif(wordAjax.status == 200)\r\n");
      out.write("\t\t\t{\r\n");
      out.write("\t\t\t\tvar wordList = wordAjax.responseXML.getElementsByTagName(\"WORD\");\r\n");
      out.write("\t\t\t\tsetNames(wordList);\r\n");
      out.write("\t\t\t}\r\n");
      out.write("\t\t\telse if(wordAjax.status == 1223 || wordAjax.status == 204)// 데이터가 존재하지 않을 경우(JavaScript에서는 204 코드가 1223으로 변경됨) 다른 코드들은 대부분 정확하게 넘어옴\r\n");
      out.write("\t\t\t{\r\n");
      out.write("\t\t\t\tclearList();\r\n");
      out.write("\t\t\t}\r\n");
      out.write("\t\t}\r\n");
      out.write("\t}\r\n");
      out.write(" \r\n");
      out.write("\tfunction setNames(wordList)\r\n");
      out.write("\t{\r\n");
      out.write("\t\tclearList();\r\n");
      out.write("\t\tsetOffsets();\r\n");
      out.write(" \r\n");
      out.write("\t\tvar row, cell, txtNode;\r\n");
      out.write(" \r\n");
      out.write("\t\tfor (var i = 0; i < wordList.length; i++)\r\n");
      out.write("\t\t{\r\n");
      out.write("\t\t\tvar nextNode = wordList[i].firstChild.text;\r\n");
      out.write("\t\t\trow = document.createElement(\"TR\");\r\n");
      out.write("\t\t\tcell = document.createElement(\"TD\");\r\n");
      out.write(" \r\n");
      out.write("\t\t\tcell.onmouseout = function() {this.className='mouseOver';};\r\n");
      out.write("\t\t\tcell.onmouseover = function() {this.className='mouseOut';};\r\n");
      out.write("\t\t\tcell.setAttribute(\"bgcolor\", \"#FFFAFA\");\r\n");
      out.write("\t\t\tcell.setAttribute(\"border\", \"0\");\r\n");
      out.write("\t\t\tcell.onclick = function() {populateName(this);};\r\n");
      out.write("\t\t\ttxtNode = document.createTextNode(nextNode);\r\n");
      out.write("\t\t\tcell.appendChild(txtNode);\r\n");
      out.write("\t\t\trow.appendChild(cell);\r\n");
      out.write("\t\t\tnameTableBody.appendChild(row);\r\n");
      out.write("\t\t}\r\n");
      out.write("\t\treturn;\r\n");
      out.write("\t}\r\n");
      out.write(" \r\n");
      out.write("\tfunction setOffsets()\r\n");
      out.write("\t{\r\n");
      out.write("\t\tvar end = wordField.offsetWidth;\r\n");
      out.write("\t\tvar left = calculateOffsetLeft(wordField);\r\n");
      out.write("\t\tvar top = calculateOffsetTop(wordField) + wordField.offsetHeight;\r\n");
      out.write("\t\tcompleteDiv.style.border = \"black 1px solid\";\r\n");
      out.write("\t\tcompleteDiv.style.left = left + \"px\";\r\n");
      out.write("\t\tcompleteDiv.style.top = top + \"px\";\r\n");
      out.write("\t\tnameTable.style.width = end + \"px\";\r\n");
      out.write("\t}\r\n");
      out.write(" \r\n");
      out.write("\tfunction calculateOffsetLeft(field)\r\n");
      out.write("\t{\r\n");
      out.write("\t\treturn calculateOffset(field, \"offsetLeft\");\r\n");
      out.write("\t}\r\n");
      out.write(" \r\n");
      out.write("\tfunction calculateOffsetTop(field)\r\n");
      out.write("\t{\r\n");
      out.write("\t\treturn calculateOffset(field, \"offsetTop\");\r\n");
      out.write("\t}\r\n");
      out.write(" \r\n");
      out.write("\tfunction calculateOffset(field, attr)\r\n");
      out.write("\t{\r\n");
      out.write("\t\tvar offset = 0;\r\n");
      out.write("\t\twhile(field)\r\n");
      out.write("\t\t{\r\n");
      out.write("\t\t\toffset = offset + field[attr];\r\n");
      out.write("\t\t\tfield = field.offsetParent;\t\t//자식엘리먼트의 위치에 영향을 미치는 상위 엘리먼트를 치칭 하는것\r\n");
      out.write("\t\t}\r\n");
      out.write("\t\treturn offset;\r\n");
      out.write("\t}\r\n");
      out.write(" \r\n");
      out.write("\tfunction populateName(cell)\r\n");
      out.write("\t{\r\n");
      out.write("\t\twordField.value = cell.firstChild.nodeValue;\r\n");
      out.write("\t\tclearList();\r\n");
      out.write("\t}\r\n");
      out.write(" \r\n");
      out.write("\tfunction clearList()\r\n");
      out.write("\t{\r\n");
      out.write("\t\tvar ind = nameTableBody.childNodes.length;\r\n");
      out.write("\t\tfor (var i = ind - 1; i >= 0 ; i--)\r\n");
      out.write("\t\t{\r\n");
      out.write("\t\t\tnameTableBody.removeChild(nameTableBody.childNodes[i]);\r\n");
      out.write("\t\t}\r\n");
      out.write("\t\tcompleteDiv.style.border = \"none\";\r\n");
      out.write("\t}\r\n");
      out.write("\t\r\n");
      out.write("</SCRIPT>\r\n");
      out.write("\r\n");
      out.write("<FORM name=\"bbsForm\" action=\"/servlet/service.BbsServlet\" method=\"post\">\r\n");
      out.write("\t<INPUT type=\"hidden\" name=\"func\">\r\n");
      out.write("\t<INPUT type=\"hidden\" name=\"wordCountYn\" value='N'>\r\n");
      out.write("\t<INPUT type=\"hidden\" name=\"seq\">\r\n");
      out.write("\t<INPUT type=\"hidden\" name=\"hit\">\r\n");
      out.write("\t<INPUT type=\"hidden\" name=\"code\" value=\"");
      out.print( code);
      out.write("\">\r\n");
      out.write("\t<INPUT type=\"hidden\" name=\"section\" value=\"");
      out.print( section);
      out.write("\">\r\n");
      out.write("\t<INPUT type=\"hidden\" name=\"word\" value=\"");
      out.print( word);
      out.write("\">\r\n");
      out.write("\t<INPUT type=\"hidden\" name=\"pageNum\" value=\"");
      out.print( pageNum);
      out.write("\">\r\n");
      out.write("</FORM>\r\n");
      out.write("\r\n");
      out.write("<FORM name=\"fileDownloadForm\" action=\"/common/FileDownload.jsp\" method=\"post\">\r\n");
      out.write("\t<INPUT type=\"hidden\" name=\"savePath\">\r\n");
      out.write("\t<INPUT type=\"hidden\" name=\"saveName\">\r\n");
      out.write("\t<INPUT type=\"hidden\" name=\"orgName\">\r\n");
      out.write("</FORM>\r\n");
      out.write("\r\n");
      out.write("<CENTER>\r\n");
      out.write("\t<TABLE cellspacing=\"0\" cellpadding=\"0\">\r\n");
      out.write("\t\t<TR><TD height=\"25\"></TD></TR>\r\n");
      out.write("\t</TABLE>\r\n");
      out.write("\t<TABLE cellspacing=\"1\" cellpadding=\"5\" bgcolor=\"#7682EB\" width=\"250\">\r\n");
      out.write("\t\t<TR>\r\n");
      out.write("\t\t\t<TD align=\"center\" bgcolor=\"#CFDDFA\" width=\"250\">\r\n");
      out.write("\t\t\t\t<FONT color=\"blue\" size=\"3\"><B>");
      out.print( bbsName);
      out.write("</B></FONT>\r\n");
      out.write("\t\t\t</TD>\r\n");
      out.write("\t\t</TR>\r\n");
      out.write("\t</TABLE>\r\n");
      out.write("\t<TABLE cellspacing=\"0\" cellpadding=\"0\">\r\n");
      out.write("\t\t<TR><TD height=\"15\"></TD></TR>\r\n");
      out.write("\t</TABLE>\r\n");

	if(bi.getSearchYn())
	{

      out.write("\r\n");
      out.write("\t<TABLE cellspacing=\"0\" cellpadding=\"0\" border=\"0\" width=\"750\">\r\n");
      out.write("\t\t<FORM name=\"searchForm\">\r\n");
      out.write("\t\t\t<TR>\r\n");
      out.write("\t\t\t\t<TD align=\"right\" width=\"750\">\r\n");
      out.write("\t\t\t\t\t<A href=\"javascript:allSearchAction();\"><B><FONT color=\"#A80054\">[전체 검색]</FONT></B></A>\r\n");
      out.write("\t\t\t\t\t&nbsp;\r\n");
      out.write("\t\t\t\t\t<SELECT name=\"section\">\r\n");
      out.write("\t\t\t\t\t\t<OPTION value=\"TC\"");
if(section.equals("TC")){
      out.write(" selected");
}
      out.write(">제목+본문</OPTION>\r\n");
      out.write("\t\t\t\t\t\t<OPTION value=\"TT\"");
if(section.equals("TT")){
      out.write(" selected");
}
      out.write(">제목</OPTION>\r\n");
      out.write("\t\t\t\t\t\t<OPTION value=\"CT\"");
if(section.equals("CT")){
      out.write(" selected");
}
      out.write(">본문</OPTION>\r\n");
      out.write("\t\t\t\t\t\t<OPTION value=\"WT\"");
if(section.equals("WT")){
      out.write(" selected");
}
      out.write(">작성자 ID</OPTION>\r\n");
      out.write("\t\t\t\t\t</SELECT>\r\n");
      out.write("\t\t\t\t\t<INPUT type=\"text\" name=\"word\" value=\"\" onkeyup=\"wordComplete();\" onclick=\"wordComplete();\">\r\n");
      out.write("\t\t\t\t\t<IMG src=\"/images/button/button_search.gif\" border=\"0\" align=\"absmiddle\" style=\"cursor:hand\" onClick=\"searchAction();\">\r\n");
      out.write("\t\t\t\t</TD>\r\n");
      out.write("\t\t\t</TR>\r\n");
      out.write("\t\t\t\r\n");
      out.write("\t\t\t<TR>\r\n");
      out.write("\t\t\t\t<TD>\r\n");
      out.write("\t\t\t\t\t<DIV style=\"position:absolute;\" id=\"wordDiv\">\r\n");
      out.write("\t\t\t\t\t\t<TABLE id=\"wordTable\" bgcolor=\"#FFFAFA\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\r\n");
      out.write("\t\t\t\t\t\t\t<TBODY id=\"wordTableBody\"></TBODY>\r\n");
      out.write("\t\t\t\t\t\t</TABLE>\r\n");
      out.write("\t\t\t\t\t</DIV>\r\n");
      out.write("\t\t\t\t</TD>\r\n");
      out.write("\t\t\t</TR>\r\n");
      out.write("\t\t\t\r\n");
      out.write("\t\t\t<TR><TD height=\"3\"></TD></TR>\r\n");
      out.write("\t\t</FORM>\r\n");
      out.write("\t</TABLE>\r\n");

	}

      out.write("\r\n");
      out.write("\t<TABLE cellspacing=\"0\" cellpadding=\"0\" border=\"0\" width=\"750\">\r\n");
      out.write("\t\t<TR valign=\"bottom\">\r\n");
      out.write("\t\t\t<TD align=\"left\" width=\"250\">\r\n");

	if(loginYn && (bi.getUpdateYn() || adminYn))
	{

      out.write("\r\n");
      out.write("\t\t\t\t\t<IMG src=\"/images/button/button_write.gif\" border=\"0\" onclick=\"goWrite();\" style=\"cursor:hand\" align=\"absmiddle\">\r\n");

	}

      out.write("\r\n");
      out.write("\t\t\t</TD>\r\n");
      out.write("\t\t\t<TD align=\"right\" width=\"500\">\r\n");
      out.write("\t\t\t\t<FONT color=\"blue\"><B>");
      out.print( articleTotalNum);
      out.write("</B></FONT>\r\n");
      out.write("\t\t\t\t개 글 중 <FONT color=\"red\"><B>");
      out.print( startNum);
      out.write("</B></FONT>\r\n");
      out.write("\t\t\t\t~ <FONT color=\"red\"><B>");
      out.print( endNum);
      out.write("</B></FONT> \r\n");
      out.write("\t\t\t\t(<FONT color=\"blue\"><B>");
      out.print( pageTotalNum);
      out.write("</B></FONT> page 중\r\n");
      out.write("\t\t\t\t<FONT color=\"red\"><B>");
      out.print( pageNum);
      out.write("</B></FONT> page)\r\n");
      out.write("\t\t\t</TD>\r\n");
      out.write("\t\t</TR>\r\n");
      out.write("\t\t<TR><TD height=\"3\"></TD></TR>\r\n");
      out.write("\t</TABLE>\r\n");
      out.write("\t<TABLE cellspacing=\"1\" cellpadding=\"4\" bgcolor=\"#7682EB\" width=\"750\">\r\n");
      out.write("\t\t<TR bgcolor=\"#CFDDFA\" align=\"center\">\r\n");
      out.write("\t\t\t<TD width=\"50\"><B>No.</B></TD>\r\n");
      out.write("\t\t\t<TD><B>제목</B></TD>\r\n");

	if(bi.getFileYn())
	{

      out.write("\r\n");
      out.write("\t\t\t<TD width=\"110\"><B>첨부파일</B></TD>\r\n");

	}

      out.write("\r\n");
      out.write("\t\t\t<TD width=\"90\"><B>작성자</B></TD>\r\n");
      out.write("\t\t\t<TD width=\"100\"><B>작성일</B></TD>\r\n");
      out.write("\t\t\t<TD width=\"60\"><B>조회수</B></TD>\r\n");
      out.write("\t\t</TR>\r\n");

	for(int i=0; i<bbsList.size(); i++)
	{
		Hashtable bbsTable = (Hashtable)bbsList.get(i);
		String dispNum = (String)bbsTable.get("DISP_NUM");
		String seq = (String)bbsTable.get("SEQ");
		String groupNum = (String)bbsTable.get("GROUP_NUM");
		int width = Integer.parseInt((String)bbsTable.get("WIDTH"));
		String depth = (String)bbsTable.get("DEPTH");
		String step = (String)bbsTable.get("STEP");
		String addCnt = (String)bbsTable.get("ADD_CNT");
		String hitCnt = (String)bbsTable.get("HIT_CNT");
		String regDate = (String)bbsTable.get("REG_DATE");
		String regId = (String)bbsTable.get("REG_ID");
		String name = (String)bbsTable.get("NAME");
		String title = (String)bbsTable.get("TITLE");
		if(title.length()>22)
		{
			title = title.substring(0, 19) + "...";
		}

		String hit = "Y";
		if((loginYn && regId.equals((String)session.getAttribute("id"))) || adminYn)
		{
			hit = "N";
		}

      out.write("\r\n");
      out.write("\t\t<TR bgcolor=\"#FFFFFF\">\r\n");
      out.write("\t\t\t<TD align=\"center\">");
      out.print( dispNum);
      out.write("</TD>\r\n");
      out.write("\t\t\t<TD>\r\n");

		if(width > 0)
		{
			for(int j=0; j<width-1; j++)
			{

      out.write("\r\n");
      out.write("\t\t\t\t&nbsp;&nbsp;\r\n");

			}

      out.write("\r\n");
      out.write("\t\t\t\t<IMG src=\"/images/button/reply.gif\" border=\"0\" align=\"absmiddle\">\r\n");

		}

      out.write("\r\n");
      out.write("\t\t\t\t<A href=\"javascript:viewAction('");
      out.print( seq);
      out.write("', '");
      out.print( hit);
      out.write("')\">");
      out.print( title);
if(bi.getAddYn()){
      out.write(' ');
      out.write('(');
      out.print( addCnt);
      out.write(')');
}
      out.write("</A>\r\n");
      out.write("\t\t\t</TD>\r\n");

		if(bi.getFileYn())
		{

      out.write("\r\n");
      out.write("\t\t\t<TD align=\"center\">\r\n");

			ArrayList bbsFileList = (ArrayList)bbsTable.get("FILE_LIST");
			for(int j=0; j<bbsFileList.size(); j++)
			{
				Hashtable fileTable = (Hashtable)bbsFileList.get(j);
				String path = (String)fileTable.get("PATH");
				String orgName = (String)fileTable.get("ORG_NAME");
				String saveName = (String)fileTable.get("SAVE_NAME");
				String imgName = "etc";

				if(orgName==null || orgName.length()==0)
				{
					break;
				}

				if(orgName.lastIndexOf(".") != -1)
				{
					imgName = (orgName.substring(orgName.lastIndexOf(".")+1)).toLowerCase();
					if(!imgName.equals("bmp") && !imgName.equals("doc") && !imgName.equals("gif") && !imgName.equals("html") && !imgName.equals("hwp") && !imgName.equals("jpg") && !imgName.equals("pdf") && !imgName.equals("ppt") && !imgName.equals("txt") && !imgName.equals("xls") && !imgName.equals("zip"))
					{
						imgName = "etc";
					}
				}

      out.write("\r\n");
      out.write("\t\t\t\t<A href=\"javascript:fileDownloadAction('");
      out.print( path);
      out.write("', '");
      out.print( saveName);
      out.write("', '");
      out.print( orgName);
      out.write("');\"><IMG src=\"/images/file/");
      out.print( imgName);
      out.write(".gif\" alt=\"");
      out.print( orgName);
      out.write("\" border=\"0\"></A>\r\n");

			}

      out.write("\r\n");
      out.write("\t\t\t</TD>\r\n");

		}

      out.write("\r\n");
      out.write("\t\t\t<TD align=\"center\">");
      out.print( name);
      out.write("</TD>\r\n");
      out.write("\t\t\t<TD align=\"center\">");
      out.print( regDate);
      out.write("</TD>\r\n");
      out.write("\t\t\t<TD align=\"center\">");
      out.print( hitCnt);
      out.write("</TD>\r\n");
      out.write("\t\t</TR>\r\n");

	}

	if(bbsList.size()==0)
	{

      out.write("\r\n");
      out.write("\t\t<TR><TD align=\"center\" bgcolor=\"#FFFFFF\" colspan=\"");
if(!bi.getFileYn()){
      out.write('5');
}else{
      out.write('6');
}
      out.write("\"><B>등록된 글이 없습니다.</B></TD></TR>\r\n");

	}

      out.write("\r\n");
      out.write("\t</TABLE>\r\n");
      out.write("\r\n");
      out.write("\t<TABLE cellspacing=\"0\" cellpadding=\"0\" width=\"750\">\r\n");
      out.write("\t\t<TR><TD height=\"10\"></TD></TR>\r\n");
      out.write("\t\t<TR>\r\n");
      out.write("\t\t\t<TD width=\"750\">\r\n");
      out.write("\t\t\t\t");
      org.apache.jasper.runtime.JspRuntimeLibrary.include(request, response, "/bbs/BbsPageNumber.jsp", out, true);
      out.write("\r\n");
      out.write("\t\t\t</TD>\r\n");
      out.write("\t\t</TR>\r\n");
      out.write("\t\t<TR><TD height=\"30\"></TD></TR>\r\n");
      out.write("\t</TABLE>\r\n");
      out.write("</CENTER>");
    } catch (Throwable t) {
      if (!(t instanceof SkipPageException)){
        out = _jspx_out;
        if (out != null && out.getBufferSize() != 0)
          try { out.clearBuffer(); } catch (java.io.IOException e) {}
        if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
      }
    } finally {
      _jspxFactory.releasePageContext(_jspx_page_context);
    }
  }
}
